package com.qfedu.zf.index.controller;


import com.qfedu.zf.common.vo.R;
import com.qfedu.zf.index.service.ListingsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;
import java.util.Map;

/**
 * <p>
 * 房源表 前端控制器
 * </p>
 *
 * @author wgz
 * @since 2024-06-15
 */
@RestController
@RequestMapping("/index/listings")
public class ListingsController {

    @Autowired
    ListingsService listingsService;

    @RequestMapping("/selectAll")
    public R selectByCityAll(@RequestParam Map map) {
//        System.out.println(map);
        return listingsService.selectByCityAll(map);
    }

    @RequestMapping("/info")
    public R info(@RequestParam Map<String,Object> map, HttpServletRequest request) {
        return listingsService.info(map,request);
    }

}

